package cn.net.msg.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.springframework.stereotype.Component;

@Component("favouritelist")
@Entity @Table(name = "tb_favouritelist")
public class TbFavourite {

    @Id @Column(name = "Favouritelist_id", length = 11)
    private int favouritelistId;

    @Column(name = "Favouritelist_userid", length = 20)
    private long favouritelistUserid;

    @Column(name = "Favouritelist_newstype", length = 11)
    private int favouritelistNewstype;

    @Column(name = "Favouritelist_title", length = 200)
    private String favouritelistTitle;

    @Column(name = "Favouritelist_author", length = 100)
    private String favouritelistAuthor;

    @Column(name = "Favouritelist_date", length = 100)
    private String favouritelistDate;

    @Column(name = "Favouritelist_url", length = 300)
    private String favouritelistUrl;

    @Column(name = "Favouritelist_creatdate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date favouritelistCreatdate;

    @Transient
    private boolean heatFlag;

    public TbFavourite(){

    }

    public TbFavourite(long favouritelistUserid,int favouritelistNewstype,
            String favouritelistTitle,String favouritelistAuthor,
            String favouritelistDate,String favouritelistUrl){
        this.favouritelistUserid = favouritelistUserid;
        this.favouritelistNewstype = favouritelistNewstype;
        this.favouritelistTitle = favouritelistTitle;
        this.favouritelistAuthor = favouritelistAuthor;
        this.favouritelistDate = favouritelistDate;
        this.favouritelistUrl = favouritelistUrl;
    }

    public int getFavouritelistId() {
        return favouritelistId;
    }

    public void setFavouritelistId(int favouritelistId) {
        this.favouritelistId = favouritelistId;
    }

    public long getFavouritelistUserid() {
        return favouritelistUserid;
    }

    public void setFavouritelistUserid(long favouritelistUserid) {
        this.favouritelistUserid = favouritelistUserid;
    }

    public int getFavouritelistNewstype() {
        return favouritelistNewstype;
    }

    public void setFavouritelistNewstype(int favouritelistNewstype) {
        this.favouritelistNewstype = favouritelistNewstype;
    }

    public String getFavouritelistTitle() {
        return favouritelistTitle;
    }

    public void setFavouritelistTitle(String favouritelistTitle) {
        this.favouritelistTitle = favouritelistTitle;
    }

    public String getFavouritelistAuthor() {
        return favouritelistAuthor;
    }

    public void setFavouritelistAuthor(String favouritelistAuthor) {
        this.favouritelistAuthor = favouritelistAuthor;
    }

    public String getFavouritelistDate() {
        return favouritelistDate;
    }

    public void setFavouritelistDate(String favouritelistDate) {
        this.favouritelistDate = favouritelistDate;
    }

    public String getFavouritelistUrl() {
        return favouritelistUrl;
    }

    public void setFavouritelistUrl(String favouritelistUrl) {
        this.favouritelistUrl = favouritelistUrl;
    }

    public Date getFavouritelistCreatdate() {
        return favouritelistCreatdate;
    }

    public void setFavouritelistCreatdate(Date favouritelistCreatdate) {
        this.favouritelistCreatdate = favouritelistCreatdate;
    }

    public boolean isHeatFlag() {
        return heatFlag;
    }

    public void setHeatFlag(boolean heatFlag) {
        this.heatFlag = heatFlag;
    }
}
